/*
* @author : TF-BJ-C064
* @creation : 2014-8-6 下午8:52:12
* @description : 
*
*/

package com.umeng;

import org.apache.http.Header;
import org.apache.log4j.Logger;


public class UMUser {
	
	public Logger log = Logger.getLogger(UMUser.class);
	
	private String username;
	private String password;
	private String lt;
	private String service;
	
	private String cookies;
	
	public UMUser(){}

	public UMUser(String username, String password) {
		super();
		this.username = username;
		this.password = password;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getLt() {
		return lt;
	}

	public void setLt(String lt) {
		this.lt = lt;
	}

	public String getService() {
		return service;
	}

	public void setService(String service) {
		this.service = service;
	}

	public String getCookies() {
		return cookies;
	}

	public void setCookies(String cookies) {
		this.cookies = cookies;
	}

	public void setCookie(Header[] cookieHeaders) {
		if(cookieHeaders==null || cookieHeaders.length<1){
			log.info("cookieHeaders is empty");
			return;
		}
		cookies = "";
		for(Header s : cookieHeaders){
			String str = s.toString();
			cookies += str.split(":")[1].split(";")[0]+";";
		}
		log.info("cookies: " +cookies);
	}

}
